<!DOCTYPE HTML />
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>选手列表</title>
    <?php include_once("common/common_js.php") ?>
    <link href="/css/main.css" rel="stylesheet"/>
</head>
<body>
<?php include_once("common/banner.php"); ?>
<div class="warpper">
    <?php include_once("common/mini_header.php"); ?>
    <div class="part_d" style="height:290px;">
        <div class="header">
            <div class="title">选手</div>
            <div class="search" style="color:white;padding-right:5px;">
                更多
            </div>
        </div>
        <div class="list" style="height:240px;">
            <?php foreach ($view['pagination']['data'] as $value) { ?>
            <div class="p" style="width:108px;">
                <a href="/index.php/stars/xuanshou/<?php echo $value['applicationId'] ?>"><img
                        src="<?php echo $value['photo'] ?>" width="140px" height="170px;"/></a>
                <label>
                    <?php
                    $userVote = $this->modules->UserVote;
                    echo $userVote->findCountByUserId($value['applicationId'], 1);
                    ?>票


                    <label><?php echo $value['name'];?> |<a href='javascript:void(0)'
                                                            onclick="voteApplication(<?php echo $value['applicationId']; ?>)">投票</a></label>

                </label>
            </div>
            <?php } ?>


        </div>
    </div>
    <?php include("common/footer.php"); ?>
</div>
<script language="javascript">
    function voteApplication($applicationId) {
        $.get("<?php echo URL_PREFIX; ?>/ajax/voteApplication", {operatorId:1,operatedId:$applicationId}, function(data) {
            alert(data);
        })
    }
</script>
</body>
</html>